﻿<%@ Page AutoEventWireup="true" CodeFile="SearchUserTask.aspx.cs" Inherits="Task_SearchUserTask"
    Language="C#" MasterPageFile="~/Task/Task.master" StylesheetTheme="Content" Title="Untitled Page" %>

<asp:Content ID="Content1" runat="Server" ContentPlaceHolderID="ContentPlaceHolder1">
    <ajaxToolkit:CalendarExtender ID="CalendarExtender_StartDate" runat="server" TargetControlID="StartDate">
    </ajaxToolkit:CalendarExtender>
    <ajaxToolkit:CalendarExtender ID="CalendarExtender_EndDate" runat="server" TargetControlID="EndDate">
    </ajaxToolkit:CalendarExtender>
    <ul class="topmenu">
        <li>执行人：<asp:DropDownList ID="UserList" runat="server" AutoPostBack="True" OnSelectedIndexChanged="FirstList_SelectedIndexChanged">
        </asp:DropDownList>
        </li>
        <li>类别：<asp:DropDownList ID="TypeList" runat="server" AutoPostBack="True" OnSelectedIndexChanged="TypeList_SelectedIndexChanged">
        </asp:DropDownList>
        </li>
        <li>
            <asp:TextBox ID="StartDate" runat="server" Width="80px"></asp:TextBox>
            至
            <asp:TextBox ID="EndDate" runat="server" Width="80px"></asp:TextBox></li>
        <li>
            <asp:Button ID="ButtonSearch" runat="server" OnClick="ButtonSearch_Click" Text="查询" /></li>
    </ul>
    <asp:GridView ID="UserGrid" runat="server" DataKeyNames="TaskId" OnRowDataBound="UserGrid_RowDataBound"
        PageSize="20" Width="100%" Caption="<span>任务列表</span>">
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemStyle HorizontalAlign="Center" />
                <HeaderStyle Width="30px" />
                <ItemTemplate>
                    <asp:Label ID="ID" runat="server" ForeColor="#666666"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="任务名称">
                <ItemTemplate>
                    [<%# GetTaskTypeName((int)Eval("TaskType")) %>] <a href='ViewUserTask.aspx?RootId=<%# Eval("TaskId") %>&UserId=<% =userId %>'>
                        <%# GetTitle((string)Eval("Title")) %>
                    </a>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="完成进度">
                <ItemTemplate>
                    <%# Eval("Progress", "{0:##}")%>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
                <HeaderStyle Width="80px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="审核分数">
                <ItemTemplate>
                    <%# Eval("Score","{0:##}") %>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
                <HeaderStyle Width="80px" />
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <div style="padding: 4px;">
        <div style="float: left">
            <asp:Label ID="lbGridInfo" runat="server"></asp:Label>
        </div>
        <div style="float: right">
            <asp:LinkButton ID="btnFirst" runat="server" CommandArgument="First" CommandName="Page"
                OnClick="btnFirst_Click">首页</asp:LinkButton>
            <asp:LinkButton ID="btnPrev" runat="server" CommandArgument="Prev" CommandName="Page"
                OnClick="btnPrev_Click">上一页</asp:LinkButton>
            <asp:LinkButton ID="btnNext" runat="server" CommandArgument="Next" CommandName="Page"
                OnClick="btnNext_Click">下一页</asp:LinkButton>
            <asp:LinkButton ID="btnLast" runat="server" CommandArgument="Last" CommandName="Page"
                OnClick="btnLast_Click">末页</asp:LinkButton>
            转到：第
            <asp:DropDownList ID="JumpList" runat="server" AutoPostBack="True" OnSelectedIndexChanged="JumpList_SelectedIndexChanged">
            </asp:DropDownList>
            页
        </div>
    </div>
</asp:Content>
